<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/jsp/common/_includes.jsp" %>
<jsp:include page="/WEB-INF/jsp/common/_head.jsp"/>
<div class="ui grid">
	<div class="row">
		<div class="column">
			<div class="ui two column grid">
				<div class="three wide column">
					<jsp:include page="/WEB-INF/jsp/common/_sidebar.jsp">
						<jsp:param name="index" value="102"/>
					</jsp:include>
				</div>
				<div id="container" class="thirteen wide column">
					<ol class="breadcrumb">
						<li><a href="/">后台管理</a></li>
						<li><a href="/support/userList">会员管理</a></li>
						<li class="active">客户列表</li>
					</ol>
                    <form class="form-inline" role="search" action="/support/userList">
                    	<div class="panel panel-default">
                    		<div class="panel-body">
								<div class="form-group">
								    <label for="exampleInputAmount">代理商：</label>
								    <div class="input-group">
								    	<input type="text" class="form-control" name="kw" value="${not empty param.kw ? param.kw : ''}" placeholder="请输入手机或邮箱或邀请码" style="width:250px;">
								    </div>
							  	</div>
							    <button type="submit" class="btn btn-default ml10">搜索</button>
						    </div>
					    </div>
					</form>
					
					<c:if test="${not empty proxyUser }">
					<label>代理商</label>
					<div class="panel panel-default">
						<table class="table table-hover">
							<thead>
								<tr>
									<th>ID</th>
									<th>昵称</th>
									<th>真实姓名</th>
									<th>注册时间</th>
									<th>申请时间</th>
									<th>审核状态</th>
									<th>邀请码</th>
		                            <th>操作</th>
								</tr>
								<tr>
									<td>${proxyUser.id }</td>
									<td>${proxyUser.nickName}</td>
									<td>${proxyUser.realName}</td>
									<td><fmt:formatDate value="${proxyUser.createTime}" pattern="yyyy-MM-dd"/></td>
									<td><fmt:formatDate value="${proxyUser.applicationPeriod}" pattern="yyyy-MM-dd"/></td>
									<td>
										<c:choose>
	                                        <c:when test="${empty proxyUser.cStatus}">
	                                            <span class="warning">
	                                        </c:when>
	                                        <c:when test="${proxyUser.cStatus == 0}">
	                                            <span class="orange">
	                                        </c:when>
	                                        <c:when test="${proxyUser.cStatus == 1}">
	                                            <span class="green">
	                                        </c:when>
	                                        <c:when test="${proxyUser.cStatus == 2}">
	                                            <span class="red">
	                                        </c:when>
	                                        <c:otherwise>
	                                            <span>
	                                        </c:otherwise>
									    </c:choose>${proxyUser.CStatusStr}</span>
									</td>
									<td>${proxyUser.inviteCode}</td>
		                            <td><a class="btn btn-info js_broadcast" href="/support/authentication/${proxyUser.id}" target="_blank">详情</a></td>
								</tr>
							</thead>
						</table>
					</div>
					</c:if>
					
					<label>客户列表</label>
					<table class="table table-hover">
						<thead>
						<tr>
							<th>ID</th>
							<th>昵称</th>
							<th>真实姓名</th>
							<th>注册时间</th>
							<th>申请时间</th>
							<th>审核状态</th>
							<th>邀请码</th>
                            <th>操作</th>
						</tr>
						</thead>
						<tbody>
						<c:forEach items="${paginate.pageList}" var="employee">
							<tr>
								<td><a href="/support/authentication/${employee.id}" target="_blank">${employee.id}</a></td>
								<td>${employee.nickName}</td>
								<td>${employee.realName}</td>
								<td><fmt:formatDate value="${employee.createTime}" pattern="yyyy-MM-dd"/></td>
								<td><fmt:formatDate value="${employee.applicationPeriod}" pattern="yyyy-MM-dd"/></td>
								<td>
								    <c:choose>
                                        <c:when test="${empty employee.cStatus}">
                                            <span class="warning">
                                        </c:when>
                                        <c:when test="${employee.cStatus == 0}">
                                            <span class="orange">
                                        </c:when>
                                        <c:when test="${employee.cStatus == 1}">
                                            <span class="green">
                                        </c:when>
                                        <c:when test="${employee.cStatus == 2}">
                                            <span class="red">
                                        </c:when>
                                        <c:otherwise>
                                            <span>
                                        </c:otherwise>
								    </c:choose>
                                    ${employee.CStatusStr}</span>
                                </td>
                                <td>${employee.inviteCode}</td>
								<td> <a class="btn btn-info js_broadcast" href="/support/authentication/${employee.id}" target="_blank">详情</a></td>
							</tr>
						</c:forEach>
						</tbody>
					</table>
                    <div class="page-info clearfix">
                        <jsp:include page="/WEB-INF/jsp/common/_page.jsp"/>
                    </div>
				</div>
			</div>
		</div>
	</div>
</div>
<jsp:include page="/WEB-INF/jsp/common/_foot.jsp"/>